<!--
 *
 * FaZend Framework
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt. It is also available 
 * through the world-wide-web at this URL: http://www.fazend.com/license
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@fazend.com so we can send you a copy immediately.
 *
-->

<?php if (!FaZend_User::isLoggedIn()): ?>

    <a href="#_self" 
        onclick="document.getElementById('lf').style.display = 'block'; 
            document.getElementById('lf').loginEmail.focus(); 
            return false;"
        >login</a> |

    <a href="<?php echo $this->url(array('action'=>'register'), 'user', true)?>">create account</a>

    <div id="lf" 
        <?php echo (($this->form->email->getValue() || $this->form->pwd->getValue()) ? 
            false : 
            ' style="display: none;"')?>
        ><?php echo $this->form?>
    </div>

<?php else: ?>

    <?php echo $this->escape(FaZend_User::getCurrentUser()->email)?><br/>

    <a href="<?php echo $this->url(array('controller'=>'index', 'action'=>'settings'), 'default', true)?>"
        >settings</a> |
    <a href="<?php echo $this->url(array('action'=>'logout'), 'user', true)?>"
        >logout</a>

<?php endif;
